home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / peintro.lha / SCROLLER3.S
Encoding:
Text File  |  1999-09-27  |  6.2 KB  |  294 lines

  1. ************************************************************
  2. *   TEKST IS ON LINE 241 EN ON LINE 254                    *
  3. *   THIS DEMO CAN PLAY WITH A SOUNDTRACKERMOD.             *
  4. *   BUT NOT MOORE THAN 16 INSTRUMENTS                      *
  5. *   PS. PS. USE TNM SOUNDTRACKER OR DOC V2.0-V2.1 OR V2.2  *
  6. *               HAVE FUN MANNY!!!!                         *
  7. ************************************************************
  8. *                                                          *
  9. *                   GOLDLEEK PRODUCTION                    *
  10. *                                                          *
  11. *                FOR MANNY OF PENDLE EUROPA                *
  12. *                                                          *
  13. ************************************************************
  14.  
  15. eg:
  16.  
  17. ; ----- graphics.library -----
  18. scrollraster=    -396
  19. setapen=    -342
  20. text=         -60
  21. setfont=     -66
  22. closefont=    -78
  23. move=         -240
  24. draw=        -246
  25. initbitmap=     -390
  26. initrastport=     -198
  27. clearscreen=    -48
  28. ; ----- exec.library     -----
  29. allocabs=    -204
  30. openlibrary=     -408
  31. closelibrary=     -414
  32. forbid=     -132
  33. permit=     -138
  34. ; ----- diskfont.library -----
  35. openfont=     -30
  36.  
  37. execbase=     $04
  38.  
  39.  movem.l     d0-d7/a0-a6,-(a7)
  40.  ; ---- open graphics.library ----
  41.  move.l        execbase,a6
  42.  lea        gfxname,a1
  43.  jsr        openlibrary(a6)
  44.  move.l        d0,gfxbase
  45.  
  46.  jsr        forbid(a6)        ; forbid multitasking
  47.  move.w        #$0020,$dff096        ; stop sprite DMA
  48.  bsr.w        setupcopper        ; copperliste setzen
  49.  move.l        gfxbase,a0        ; copperliste einschalten
  50.  add.l        #$32,a0
  51.  move.w        #$0080,$dff096
  52.  move.l        (a0),oldcopper
  53.  move.l        #newcopper,(a0)
  54.  move.w        #$8080,$dff096
  55.  move.l        gfxbase,a6        ; bitmapstruktur
  56.  lea        bitmap,a0        ; initialisieren
  57.  move.l        #$02,d0
  58.  move.l        #352,d1
  59.  move.l        #200,d2
  60.  jsr        initbitmap(a6)
  61.  move.l        #$50000,plane1
  62.  move.l        #$52260,plane1+4
  63.  lea        rastport,a1
  64.  jsr        initrastport(a6)
  65.  move.l        #bitmap,r_bitmap
  66.  lea        rastport,a1        ; Bildschirm loeschen
  67.  jsr        clearscreen(a6)
  68.  lea        rastport,a1        ; Zeichenfarbe setzen
  69.  move.l        #$01,d0
  70.  jsr        setapen(a6)
  71.  move.l        #39,d7            ; linien ziehen
  72.  clr.l        d6
  73.  
  74.  dloop1:
  75.  lea        rastport,a1
  76.  move.l        #160,d0
  77.  move.l        #44,d1
  78.  jsr        move(a6)
  79.  lea        rastport,a1
  80.  move.l        #156,d1
  81.  move.l        d6,d0
  82.  jsr        draw(a6)
  83.  add.l        #8,d6
  84.  dbra        d7,dloop1
  85.  lea        rastport,a1
  86.  move.l        #$02,d0            ; zeichenfarbe setzen
  87.  jsr        setapen(a6)
  88.  move.l        #$02,d7            ; text ausgeben
  89.  lea        texttab,a5
  90.  
  91.  textloop1:
  92.  lea        rastport,a1
  93.  move.l        (a5)+,d0
  94.  move.l        (a5)+,d1
  95.  jsr        move(a6)
  96.  lea        rastport,a1
  97.  move.l        (a5)+,d0
  98.  move.l        (a5)+,a0
  99.  jsr        text(a6)
  100.  dbra        d7,textloop1
  101.  move.w        #$4000,$dff09a        ; neuen irq einschalten
  102.   move.l        $6c,oldirq
  103.  move.l        #newirq,$6c
  104.  move.w        #$c000,$dff09a
  105.  
  106.  wait:
  107.  btst        #6,$bfe001        ; linke maustaste ???
  108.  bne.s        wait
  109.  move.w        #$4000,$dff09a        ; auf alten irq zurueck
  110.  move.l        oldirq,$6c
  111.  move.w        #$c000,$dff09a
  112.  move.l        execbase,a6
  113.  move.l        gfxbase,a1        ; graphic.lib schliessen
  114.  jsr        closelibrary(a6)
  115.  move.l        gfxbase,a0        ; alte copperliste einschalten
  116.  add.l        #$32,a0
  117.  move.w        #$0080,$dff096
  118.  move.l        oldcopper,(a0)
  119.  move.w        #$8080,$dff096
  120.  move.l        execbase,a6        ; multitasking erlauben
  121.  jsr        permit(a6)
  122.  move.w        #$8020,$dff096        ; sprite DMA einschalten
  123.  movem.l        (a7)+,d0-d7/a0-a6
  124.  
  125.  error:
  126.  rts
  127.  
  128.  
  129.  newirq:
  130.  movem.l        d0-d7/a0-a6,-(sp)
  131.  bsr.w        setupcopper        ; goldene streifen bewegen
  132.  lea        waitab+6,a0
  133.  move.l        a0,a1
  134.  add.l        ptr1,a0
  135.  add.l        ptr2,a1
  136.  lea        goldcol,a2
  137.  move.l        #22,d2
  138.  addloop2:
  139.  move.w        (a2),(a0)
  140.  move.w        (a2)+,(a1)
  141.  add.l        #$08,a0
  142.  add.l        #$08,a1
  143.  dbra        d2,addloop2
  144.  add.l        #$08,ptr1
  145.  sub.l        #$08,ptr2
  146.  cmp.l        #$00,ptr2
  147.  bne.s        exity
  148.  move.l        #24,ptr1
  149.  move.l        #696,ptr2
  150.  exity:
  151.  move.l        gfxbase,a6        ; scrolling
  152.  lea        rastport,a1
  153.  move.l        #$01,d0
  154.  clr.l        d1
  155.  move.l        #0,d2
  156.  move.l        #32,d3
  157.  move.l        #351,d4
  158.  move.l        #42,d5
  159.  jsr        scrollraster(a6)
  160.  ;lea        rastport,a1
  161.  ;move.l        #$01,d0
  162.  ;clr.l        d1
  163.  ;move.l        #0,d2
  164.  ;move.l        #161,d3
  165.  ;move.l        #351,d4
  166.  ;move.l        #181,d5
  167.  ;jsr        scrollraster(a6)
  168.  lea        rastport,a1        ; zweites scrolling
  169.  move.l        #$01,d0
  170.  clr.l        d1
  171.  move.l        #0,d2
  172.  move.l        #160,d3
  173.  move.l        #351,d4
  174.  move.l        #168,d5
  175.  jsr        scrollraster(a6)
  176.  sub.b        #$01,rows        ; schon 1 zeichen gescrollt
  177.  bne.s        continue1
  178.  move.b        #8,rows
  179.  move.l        gfxbase,a6
  180.  lea        rastport,a1
  181.  move.l        #$02,d0
  182.  jsr        setapen(a6)
  183.  lea        rastport,a1
  184.  move.l        #320,d0
  185.  move.l        #38,d1
  186.  bsr.s        text1
  187.  lea        rastport,a1
  188.  move.l        #320,d0
  189.  move.l        #167,d1
  190.  bsr.s        text1
  191.  ;lea        rastport,a1
  192.  ;move.l        #320,d0
  193.  ;move.l        #70,d1
  194.  ;bsr.s        text1
  195.  add.l        #$01,c_ptr
  196.  cmp.l        #ende,c_ptr
  197.  bne.s        continue1
  198.  move.l        #scrollmsg,c_ptr
  199.  continue1:
  200.  movem.l        (sp)+,d0-d7/a0-a6
  201.  dc.w        $4ef9
  202.  oldirq:
  203.  dc.l    0
  204.  
  205.  text1:
  206.  jsr        move(a6)        ; naechstes zeichen aus scroll
  207.  lea        rastport,a1        ; text ausgeben
  208.  move.l        c_ptr,a0
  209.  move.l        #1,d0
  210.  jsr        text(a6)
  211.  rts
  212.  
  213.  setupcopper:
  214.  lea        waitab,a0
  215.  move.l        #111,d0
  216.  move.w        #$5809,d1
  217.  addloop1:
  218.  move.w        d1,(a0)+        ; WAIT
  219.  move.w        #$fffe,(a0)+        ; alle bits beachten
  220.  move.w        #$0182,(a0)+        ; Farbe 1
  221.  move.w        #$0000,(a0)+        ; schwarz
  222.  add.w        #$0100,d1        ; naechste rasterzeile
  223.  dbra        d0,addloop1
  224.  rts
  225.  section copper,code_c
  226.  goldcol:
  227.  dc.w    $420,$530,$640,$750,$860,$970,$a80,$b90,$ca0,$db1,$ec2,$fd3
  228.  dc.w    $ec2,$db1,$ca0,$b90,$a80,$970,$860,$750,$640,$530,$420
  229.  
  230.  newcopper:
  231.  dc.w $0180,$0000,$0182,$0fff
  232.  dc.w $0184,$000f,$0186,$0fff
  233.  dc.w $008e,$2c81,$0090,$f4c1
  234.  dc.w $0092,$0038,$0094,$00d0
  235.  dc.w $0108,$0004,$010a,$0004
  236.  dc.w $0102,$0000,$0104,$0000
  237.  dc.w $0100,$2200,$00e0,$0005
  238.  dc.w $00e2,$0000,$00e4,$0005
  239.  dc.w $00e6,$2260
  240.  dc.w $4809,$fffe,$0180,$0ff0
  241.  dc.w $4a09,$fffe,$0180,$0bb0
  242.  dc.w $5509,$fffe,$0180,$0880
  243.  dc.w $5609,$fffe,$0184,$0f83
  244.  dc.w $5709,$fffe,$0180,$0000
  245.  waitab:
  246.  dcb.w 448,0    
  247.  dc.w $c909,$fffe,$0180,$00f0
  248.  dc.w $ca09,$fffe,$0184,$0f00
  249.  dc.w $cb09,$fffe,$0180,$00b0
  250.  dc.w $d609,$fffe,$0180,$0080
  251.  dc.w $d809,$fffe,$0180,$0000
  252.   dc.w $ffff,$fffe
  253.  even
  254.  scrollmsg:
  255.  dc.b "The FATBOYS presenting annother new product "
  256.  dc.b "it's calling seka and this time it's in the ram "
  257.  dc.b "and now some greetings......"
  258.  ende:
  259.  dc.b    0
  260.  even
  261.  itext:
  262.  DC.B    "GOLDLEEK & THE HUNTER"
  263.  itext2:
  264.  DC.B    "Present in 1990"
  265.  itext3:
  266.  DC.B    "NAAM VAN HET PROGRAMMA"
  267.  even
  268.  gfxbase:
  269.  dc.l     0
  270.   bitmap:
  271.  dcb.w     4,0
  272.  plane1:
  273.  dcb.l     10,0
  274.  rastport:
  275.  dcb.l     1,0
  276.  r_bitmap:
  277.  dcb.l     26,0
  278.  oldcopper:
  279.  dc.l     0
  280.  gfxname:
  281.  dc.b     "graphics.library",0
  282.  rows:
  283.  dc.b    2
  284.  even
  285.  c_ptr:
  286.  dc.l    scrollmsg
  287.  ptr1:
  288.  dc.l    24
  289.  ptr2:
  290.  dc.l    696
  291.  texttab:
  292.  dc.l    76,70,21,itext,100,100,15,itext2,74,130,22,itext3
  293.  
  294.